<div class="row-fluid">	
<div class="box span12">
    <div class="box-header">
        <h2><i class="icon-align-justify"></i><span class="break"></span>借款资料预览</h2>
        <div class="box-icon">
            <a href="#" class="btn-minimize"><i class="icon-chevron-up"></i></a>
            <a href="#" class="btn-close"><i class="icon-remove"></i></a>
        </div>
    </div>
    <div class="box-content">
        <table class="table table-bordered table-striped table-condensed">
              <thead>
                  <tr>
                      <th>属性</th>
                      <th>值</th>                         
                  </tr>
              </thead>   
              <tbody>
                <tr>
                    <td>标状态：</td>
                    <td class="center"><?php echo Loan::$status[$loan->getStatusAndChange()]; ?></td>                           
                </tr>     
                <tr>
                    <td>用户名：</td>
                    <td class="center"><?php echo $loan->getUserName(); ?></td>                           
                </tr>    
                <tr>
                    <td>借款用途：</td>
                    <td class="center"><?php echo $loan->getPurposeToString(); ?></td>                           
                </tr>
                <tr>
                    <td>列表类型：</td>
                    <td class="center"><?php echo $loan->getListTypeToString(); ?></td>                           
                </tr>
                <tr>
                    <td>借款标题：</td>
                    <td class="center"><?php echo $loan->getTitle(); ?></td>                           
                </tr>
               
                <tr>
                    <td>借款金额：</td>
                    <td class="center"><?php echo number_format($loan->getMoney(),2); ?></td>                           
                </tr>
                <tr>
                    <td>借款期限类型：</td>
                    <td class="center"><?php echo $loan->getIsDayToString(); ?></td>                           
                </tr>
                <tr>
                    <td>借款期限：</td>
                    <td class="center"><?php echo $loan->getTermNum().$loan->getIsDayToString()?></td>                           
                </tr>
                <tr>
                    <td>利率：</td>
                    <td class="center"><?php echo number_format($loan->getMoneyRate(),2); ?>%</td>                           
                </tr>
                <tr>
                    <td>截止日期：</td>
                    <td class="center"><?php echo $loan->getEndTime().'天';?></td>                           
                </tr>
                <tr>
                    <td>满标日期：</td>
                    <td class="center"><?php echo ($loan->getStatus() != 1 ) ? $loan->getDateTimeObject('begin_time')->format('Y-m-d') : '未满标';?></td>                           
                </tr>
                <tr>
                    <td>标审核状态：</td>
                    <td class="center"><?php echo $loan->getCheckLoanStatusToString();?></td>                           
                </tr>
                <tr>
                    <td>平台服务费：</td>
                    <td class="center"><?php echo number_format($loan->getServiceFee(),2);?></td>                           
                </tr>
                <tr>
                    <td>额度详情：</td>
                    <td class="center"><?php echo $loan->getDescriptions()->getRaw('quota_info'); ?></td>                           
                </tr>
                <tr>
                    <td>借款详情：</td>
                    <td class="center"><?php echo $loan->getDescriptions()->getRaw('loan_info');?></td>                           
                </tr>
                <tr>
                    <td>风险控制：</td>
                    <td class="center"><?php echo $loan->getDescriptions()->getRaw('risk_management_info'); ?></td>                           
                </tr>
                
              </tbody>
         </table>     
    </div>
</div>
</div>
<?php if($loan->getStatus() == 4 || $loan->getStatus() == 5): ?>
<div class="row-fluid">	
<div class="box span12">
    <div class="box-header">
        <h2><i class="icon-align-justify"></i><span class="break"></span>还款周期</h2>
        <div class="box-icon">
            <a href="#" class="btn-minimize"><i class="icon-chevron-up"></i></a>
            <a href="#" class="btn-close"><i class="icon-remove"></i></a>
        </div>
    </div>
    <div class="box-content">
        <table class="table table-bordered table-striped table-condensed">
              <thead>
                  <tr>
                      <th>期数</th>
                      <th>开始还款时间</th>
                      <th>本期开始时间</th>
                      <th>本期结束时间</th>
                      <th>结束还款时间</th>
                      <th>还款总额</th>
                      <th>还款利息</th>
                      <th>还款本金</th>
                  </tr>
              </thead>   
              <tbody>
                 <?php foreach($loan->getLoanInstallment() as $loan_installment): ?>
                <tr>
                    <td><?php echo $loan_installment->getPeriodization(); ?></td>
                    <td class="center"><?php echo $loan_installment->getLoanStartTime(); ?></td>   
                    <td class="center"><?php echo $loan_installment->getCurrentStartTime(); ?></td>     
                    <td class="center"><?php echo $loan_installment->getCurrentEndTime(); ?></td>   
                    <td class="center"><?php echo $loan_installment->getLoanEndTime(); ?></td>   
                    <td class="center"><?php echo number_format($loan_installment->getCurrentMoney(),2); ?></td>   
                    <td class="center"><?php echo number_format($loan_installment->getCurrentInterestMoney(),2); ?></td> 
                    <td class="center"><?php echo number_format($loan_installment->getCurrentPrincipalMoney(),2); ?></td>   
                </tr> 
                <?php endforeach; ?>
              </tbody>
         </table>     
    </div>
</div>
</div>
<?php endif; ?>